Trees | Indices | Toggle frames |
---|
Manage a collection of vertex lists for batched rendering.
Vertex lists are added to a Batch using the add and add_indexed methods. An optional group can be specified along with the vertex list, which gives the OpenGL state required for its rendering. Vertex lists with shared mode and group are allocated into adjacent areas of memory and sent to the graphics card in a single operation.
Call VertexList.delete
to remove a vertex list from the batch.
__init__(self)
Create a graphics batch.
|
|
VertexList |
add(self,
count,
mode,
group,
*data)
Add a vertex list to the batch.
|
IndexedVertexList |
add_indexed(self,
count,
mode,
group,
indices,
*data)
Add an indexed vertex list to the batch.
|
migrate(self,
vertex_list,
mode,
group,
batch)
Migrate a vertex list to another batch and/or group.
|
|
draw(self)
Draw the batch.
|
|
draw_subset(self,
vertex_lists)
Draw only some vertex lists in the batch.
|
Migrate a vertex list to another batch and/or group.
vertex_list and mode
together identify the vertex list to migrate.
group
and batch
are new owners of the vertex list after migration.
The results are undefined if mode
is not correct or if vertex_list
does not belong to this batch (they are not checked and will not
necessarily throw an exception immediately).
batch
can remain unchanged if only a group change is desired.
Draw only some vertex lists in the batch.
The use of this method is highly discouraged, as it is quite inefficient. Usually an application can be redesigned so that batches can always be drawn in their entirety, using draw.
The given vertex lists must belong to this batch; behaviour is undefined if this condition is not met.
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Thu Dec 31 17:58:18 2009 | http://epydoc.sourceforge.net |